package com.feishi.core.util.common;

import java.util.Collection;
import java.util.List;

/**
 * Created by caixq on 3/13 013.
 */
public class CollectionUtils {
    public static boolean isEmpty(Collection<?> collection) {
        return (collection == null || collection.isEmpty());
    }

    public static boolean equal(List list, List targetList) {
        if(list==null||targetList==null||list.size()!=targetList.size()){
            return false;
        }
        for (Object o : targetList) {
            if(!list.contains(o)){
                return false;
            }
        }
        for (Object o : list) {
            if(!targetList.contains(o)){
                return false;
            }
        }
        return true;
    }
}
